package service

import (
	"github.com/gin-gonic/gin"
	"github.com/mojocn/base64Captcha"
	"tyjt-ferry/pkg/jwtauth"
)

var store = base64Captcha.DefaultMemStore

// 解析data里的数据，写入MapClaims中
func PayloadFunc(data interface{}) jwtauth.MapClaims {

	return jwtauth.MapClaims{}
}

func IdentityHandler(c *gin.Context) interface{} {
	// 提取 JWT_PAYLOAD 的值
	//claims := jwtauth.ExtractClaims(c)
	return map[string]interface{}{}
}

// 登录函数，返回用户和角色信息
func Authenticator(c *gin.Context) (interface{}, error) {
	return nil, nil
}

func Authorizator(data interface{}, c *gin.Context) bool {

	return false
}

func Unauthorized(c *gin.Context, code int, message string) {

}
